package com.zyong.design.pattern.decorator.case2;

/**
 * @program: zyong-design-pattern
 * @ClassName: Bacon
 * @author: zyong
 * @create: 2024-04-28 00:27
 */
public class Bacon extends Garnish {
    public Bacon(FastFood fastFood) {
        super(fastFood, 2, "培根");
    }

    @Override
    public float cost() {
        return getPrice() + getFastFood().cost();
    }

    @Override
    public String getDesc() {
        return super.getDesc() + getFastFood().getDesc();
    }
}
